<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
    <!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
    <meta name="renderer" content="webkit">
    <!--国产浏览器高速模式-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="穷在闹市" />
    <!-- 作者 -->
    <meta name="revised" content="穷在闹市.v3, 2019/05/01" />
    <!-- 定义页面的最新版本 -->
    <meta name="description" content="网站简介" />
    <!-- 网站简介 -->
    <meta name="keywords" content="搜索关键字，以半角英文逗号隔开" />
    <title>淦就完了</title>

    <!-- 公共样式 开始 -->
    <link rel="stylesheet" type="text/css" href="/admin/css/base.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/iconfont.css">
    <script type="text/javascript" src="/admin/framework/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="/admin/layui/css/layui.css">
    <script type="text/javascript" src="/admin/layui/layui.js"></script>
    <!-- 滚动条插件 -->
    <link rel="stylesheet" type="text/css" href="/admin/css/jquery.mCustomScrollbar.css">
    <script src="/admin/framework/jquery-ui-1.10.4.min.js"></script>
    <script src="/admin/framework/jquery.mousewheel.min.js"></script>
    <script src="/admin/framework/jquery.mCustomScrollbar.min.js"></script>
    <script src="/admin/framework/cframe.js"></script><!-- 仅供所有子页面使用 -->
    <!-- 公共样式 结束 -->

    <link rel="stylesheet" type="text/css" href="/admin/css/reportForm.css">

</head>

<body>
<form action="/title_admin" method="get ">
    @csrf
<div class="layui-form-item">
    <label class="layui-form-label">搜索框</label>
    <div class="layui-input-block">
        <p>
        <input style="border:1px solid black; height: 40px; width: 500px;" type="text" name="title"  placeholder="请输入标题">
        <input type="submit" class="layui-btn" style="margin-left: 40px;" value="提交">
        </p>
    </div>
</div>
</form>
        <table class="layui-table dataTable" lay-skin="line">
            <thead>
            <tr>
                <th>标题</th>
                <th>样式</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            @foreach($labelRow as $label)
            <tr>
                <td>{{$label->name}}</td>
                <td>{{$label->style}}</td>
                <td>
                    <a href="/title_admin_del/?id={{$label->id}}">删除</a>
                    <a href="/title_admin_up/?id={{$label->id}}">修改</a>
                    <a href="/title_admin_add/?id={{$label->id}}">添加</a>
                </td>
            </tr>
                @endforeach
            </tbody>
        </table>
    </div>
    <!-- layUI 分页模块 -->
<div id="demo2" style="text-align: center">
    <script>
        layui.use(['form','laydate', 'layer', 'laypage'], function() {
            var form = layui.form;
            var laydate = layui.laydate;
            var laypage = layui.laypage,
                layer = layui.layer;

            //监听提交
            form.on('submit(formDemo)', function(data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
            laydate.render({
                elem: '#time'
                ,range: true
            });
            //select监听
            form.on('select(reportType)', function(data){
                console.log(data.elem); //得到select原始DOM对象
                console.log(data.value); //得到被选中的值
                console.log(data.othis); //得到美化后的DOM对象
            });


            //总页数大于页码总数
            layui.use(['laypage', 'layer'], function(){
                var laypage = layui.laypage
                    ,layer = layui.layer;
            laypage.render({
                elem: 'demo2'
                ,limit: {{$m}}
                ,count: {{$count}}
                ,curr: {{$page}}
                ,layui:['prev','page','next','count']
                ,theme:'#1E9FFF'
                ,jump:function(obj,first) {
                    if (!first) {
                        location.href = "/title_admin?" + "page=" + obj.curr+'&&'+'search='+"{{$search}}";
                    }
                }
            });
        });
        });
    </script>



</div>
</body>

</html>
